package com.mf.all.entity.req.user;

import com.mf.all.groups.GroupsAddInterface;
import com.mf.all.groups.GroupsAdminUpdateInterface;
import com.mf.all.groups.GroupsUpdateInterface;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * @Author: lmf
 * @Create: 2025/4/3 10:16
 * @module 用户修改密码
 */
@Data
public class ReqUserUpdatePwd {
    @NotNull(message = "id不能为空", groups = {GroupsUpdateInterface.class, GroupsAdminUpdateInterface.class})
    private Long id;
    @NotBlank(message = "旧密码不能为空", groups = {GroupsUpdateInterface.class})
    @Size(min = 6, max = 20, message = "密码长度在6-20位之间", groups = {GroupsUpdateInterface.class})
    private String oldPwd;
    @NotBlank(message = "新密码不能为空", groups = {GroupsUpdateInterface.class, GroupsAdminUpdateInterface.class})
    @Size(min = 6, max = 20, message = "新密码长度在6-20位之间", groups = {GroupsUpdateInterface.class,
            GroupsAdminUpdateInterface.class})
    private String newPwd;

}
